package com.daoos.swagger;

import javax.servlet.http.Cookie;

import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.util.MultiValueMap;

/**
 * <p>
 * 这是生成片断的方法所必须实现的接口
 * </p>
 * Created by MiaoJia(miaojia@kingsoft.com) on 2016/8/26.
 */
public interface ISnippet {
	/**
	 * 插入httpMethod
	 * 
	 * @param httpMethod
	 *            GET or POST
	 */
	void setHttpMethod(String httpMethod);

	/**
	 * 获取Http Method
	 *
	 * @return Http Method
	 */
	String getHttpMethod();

	/**
	 * 插入mediaType
	 * 
	 * @param mediaType
	 *            application/x-www-form-urlencoded or application/json
	 */
	void setMediaType(String mediaType);

	/**
	 * 获取MediaType
	 * 
	 * @return MediaType
	 */
	MediaType getMediaType() ;

	/**
	 * 插入URL
	 *
	 * @param url
	 *            URL
	 */
	void setURL(String url);

	/**
	 * 获取URL
	 * 
	 * @return url
	 */
	String getURL();

	/**
	 * 获取入参JSONs
	 *
	 * @return Json
	 */
	String getContent();

	/**
	 * 获取入参
	 * 
	 * @return MultiValueMap
	 */
	MultiValueMap<String, String> getParams();

	/**
	 * 得到头
	 * 
	 * @return HttpHeaders
	 */
	HttpHeaders getHeaders();

	/**
	 * 得到头Cookie
	 * @return Cookie
     */
	Cookie[] getCookie();

}
